﻿using System;
using System.Runtime.InteropServices;

namespace Vtron.LEDCorrective.Domain.LEDSender
{
    /// <summary>
    /// SCP协议执行结果
    /// </summary>
    /// <remarks>
    //  struct _scp_status_t
    //  {
    //      int32_t		status;
    //      u_int32_t		desclen;
    //      int8_t		desc[0];
    //  }PACKED;
    //  typedef struct _scp_status_t 
    /// </remarks>
    [Serializable]
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct SCP_STATUS_T
    {
        /// <summary>
        /// 状态
        /// </summary>
        public Int32 status;

        /// <summary>
        /// 描述长度
        /// </summary>
        public UInt32 desclen;

        /// <summary>
        /// 描述
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)] //TODO：
        public byte[] desc;
    }
}
